/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:
 * Date: 2024-09-25
 * Time: 19:25
 */
public class Test {
    public void display() {
        for (int i = 0; i < this.useSize; i++) {
            System.out.print(array[i] + " ");
        }
        System.out.println();
    }

    public void searchAdd(int val){
        if(val < array[0]){
            add(0,val);
        }
        if(val > array[useSize-1]){
            add(val);
        }
        int i = 0;
        for (; i < array.length; i++) {
            if(array[i] < val && array[i+1] > val){
                break;
            }
        }
        add(i+1, val);
    }

    public void Josephus(int n, int start, int distance){

    }
}
